package behavior.visitor;

import behavior.visitor.element.WujiangElement;
import behavior.visitor.visit.Viewer;


import java.util.LinkedList;
import java.util.List;


public class WujiangAction {

    List<WujiangElement> wujiang =  new LinkedList<>();

    /**
     * 增加武将
     * @param addWujiang
     */
    public void addWujiangAction(WujiangElement addWujiang){
        wujiang.add(addWujiang);
    }

    /**
     *
     */
    public void action(Viewer viewer){
        for (WujiangElement wujiang: wujiang){
            wujiang.accept(viewer);
        }
    }
}
